{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=110
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	s,t:string;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(s);
readln(t);
if pos(s,t)>0 then write('yes') else write('no');
end.